package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpRyMessageLogDTO;
import com.financing.wap.dao.IFpRyMessageLogDao;
import com.financing.wap.common.SqlName;
/**
 * fp_ry_message_log  
 * 融云消息记录 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpRyMessageLogDao")
public class FpRyMessageLogDaoImpl extends BaseDaoImpl<FpRyMessageLogDTO, java.lang.Integer> implements IFpRyMessageLogDao {


	@Override
	public int insert(FpRyMessageLogDTO fpRyMessageLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpRyMessageLogSql.insert, fpRyMessageLog);
	}

	@Override
	public void update(FpRyMessageLogDTO fpRyMessageLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpRyMessageLogSql.update, fpRyMessageLog);
	}

	@Override
	public void updateForce(FpRyMessageLogDTO fpRyMessageLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpRyMessageLogSql.updateForce, fpRyMessageLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpRyMessageLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpRyMessageLogDTO> queryList(FpRyMessageLogDTO fpRyMessageLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpRyMessageLogSql.queryList, fpRyMessageLog);
	}

	@Override
	public int queryListCount(FpRyMessageLogDTO fpRyMessageLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpRyMessageLogSql.queryListCount, fpRyMessageLog);
	}

	@Override
	public FpRyMessageLogDTO loadById(Integer id) throws SQLException {
		return  (FpRyMessageLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpRyMessageLogSql.loadById,id);
	}

	@Override
	public Class<FpRyMessageLogDTO> getEntityClass() {
		return FpRyMessageLogDTO.class;
	}
 	
}
